home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Toolbox
/
Visual Basic Toolbox (P.I.E.)(1996).ISO
/
buttons
/
knobvb25
/
ksnap.frm
< prev
next >
Wrap
Text File
|
1996-01-16
|
12KB
|
392 lines
VERSION 2.00
Begin Form SnapDemo
BackColor = &H00C0C0C0&
BorderStyle = 1 'Fixed Single
Caption = "Knob Snap and Multiturn Properties Demo"
ClientHeight = 3885
ClientLeft = 1485
ClientTop = 1995
ClientWidth = 8430
Height = 4290
Left = 1425
LinkTopic = "Form2"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 259
ScaleMode = 3 'Pixel
ScaleWidth = 562
Top = 1650
Width = 8550
Begin KNOB Knob1
Angle = 0
AutoRedraw = -1 'True
AVersion = 2.5
BackgroundColor = &H00C0C0C0&
BevelInner = 1 ' 1 - Raised
BevelOuter = 2 ' 2 - Inset
BevelWidth = 2
BorderType = 2 ' 2 - Outline
BorderWidth = 2
Digital = -1 'True
DigitalColor = &H00FFFFFF&
DigitalDecimals = 1
DigitalFontID = 0
DigitalX = 0
DigitalY = 0
FontID = 0
FrameColor = &H00404040&
FrameScaleX = 1.1
FrameScaleY = 1
FrameStyle = 1 ' 1 - Circle
Height = 3615
KnobColor = &H00404040&
KnobMultiTurn = -1 'True
KnobMultiTurnValue= 10
KnobRadius = 0.6
KnobSnap = -1 'True
KnobSnapIncrement= 1
KnobStyle = 1 ' 1 - Pointer
KnobUserDefined = "0,1000,200,800,50,700,500,-600,0,-500,-500,-600,-50,700,-200,800"
KnobValue = 0
Left = 75
MarkUserDefined = ""
MouseControl = -1 'True
OutlineAlign = 0 ' 0 - Left
OutlineColor = &H000000C0&
OutlineTitle = "Snap/Multiturn Demonstration"
OutlineWidth = 2
Radius = 0
TabIndex = 0
Top = 120
Value = 0
Width = 3705
XScale = 0
YScale = 0
ZLoad = KSNAP.FRX:0000
End
Begin Frame Frame1
BackColor = &H00C0C0C0&
Caption = "Snap Properties"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "Arial"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 930
Index = 1
Left = 3990
TabIndex = 1
Top = 1500
Width = 4300
Begin HScrollBar HScroll1
Height = 240
Index = 1
LargeChange = 2
Left = 1860
Max = 20
TabIndex = 3
Top = 555
Width = 2000
End
Begin CheckBox Check3
BackColor = &H00C0C0C0&
Caption = "KnobSnap"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "Arial"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Left = 360
TabIndex = 2
Top = 300
Width = 1125
End
Begin Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "0"
Height = 195
Index = 1
Left = 3930
TabIndex = 5
Top = 585
Width = 120
End
Begin Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "KnobSnapIncrement:"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "Arial"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 210
Index = 0
Left = 360
TabIndex = 4
Top = 570
Width = 1500
End
End
Begin Frame Frame1
BackColor = &H00C0C0C0&
Caption = "Multiturn Properties"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "Arial"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 930
Index = 0
Left = 3990
TabIndex = 6
Top = 2490
Width = 4300
Begin HScrollBar HScroll1
Height = 240
Index = 0
LargeChange = 100
Left = 1845
Max = 2000
SmallChange = 100
TabIndex = 10
Top = 555
Width = 2000
End
Begin CheckBox Check2
BackColor = &H00C0C0C0&
Caption = "KnobMultiturn"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "Arial"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 285
Left = 360
TabIndex = 7
Top = 300
Width = 1335
End
Begin Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "0"
Height = 195
Index = 0
Left = 3930
TabIndex = 11
Top = 585
Width = 120
End
Begin Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "KnobMultiturnValue:"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "Arial"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 210
Index = 1
Left = 360
TabIndex = 8
Top = 570
Width = 1440
End
End
Begin CheckBox Check1
BackColor = &H00C0C0C0&
Caption = "MouseControl"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "Arial"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 225
Left = 5520
TabIndex = 9
Top = 240
Width = 1635
End
Begin Frame Frame4
BackColor = &H00C0C0C0&
Caption = "Knob Color"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "Arial"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 1215
Left = 3990
TabIndex = 15
Top = 120
Width = 1305
Begin Label HColors
BackColor = &H000080FF&
Height = 225
Index = 4
Left = 570
TabIndex = 12
Top = 555
Width = 225
End
Begin Label HColors
BackColor = &H00FF00FF&
Height = 225
Index = 8
Left = 795
TabIndex = 13
Top = 780
Width = 225
End
Begin Label HColors
BackColor = &H00FF0000&
Height = 225
Index = 3
Left = 345
TabIndex = 14
Top = 555
Width = 225
End
Begin Label HColors
BackColor = &H0000FFFF&
Height = 225
Index = 7
Left = 570
TabIndex = 18
Top = 780
Width = 225
End
Begin Label HColors
BackColor = &H0000FF00&
Height = 225
Index = 2
Left = 795
TabIndex = 19
Top = 330
Width = 225
End
Begin Label HColors
BackColor = &H000000FF&
Height = 225
Index = 6
Left = 345
TabIndex = 20
Top = 780
Width = 225
End
Begin Label HColors
BackColor = &H00FFFFFF&
Height = 225
Index = 1
Left = 570
TabIndex = 21
Top = 330
Width = 225
End
Begin Label HColors
BackColor = &H00808080&
Height = 225
Index = 5
Left = 795
TabIndex = 16
Top = 555
Width = 225
End
Begin Label HColors
BackColor = &H00000000&
Height = 225
Index = 0
Left = 345
TabIndex = 17
Top = 330
Width = 225
End
End
End
Sub Check1_Click ()
knob1.MouseControl = check1
End Sub
Sub Check2_Click ()
If check2 Then check1 = check2
knob1.KnobMultiTurn = check2
End Sub
Sub Check3_Click ()
If check3 Then check1 = check3
knob1.KnobSnap = check3
End Sub
Sub Form_Load ()
hscroll1(0) = knob1.KnobMultiTurnValue * 100
hscroll1(1) = knob1.KnobSnapIncrement * 10
check1 = -knob1.MouseControl
check2 = -knob1.KnobSnap
check3 = -knob1.KnobMultiTurn
End Sub
Sub HColors_Click (index As Integer)
knob1.KnobColor = HColors(index).BackColor
End Sub
Sub HScroll1_Change (index As Integer)
Dim multiturn As Integer
Select Case index
Case 0
multiturn = hscroll1(index) / 100
knob1.KnobMultiTurnValue = multiturn
label2(index) = multiturn
Case 1
knob1.KnobSnapIncrement = hscroll1(index) / 10
label2(index) = knob1.KnobSnapIncrement
End Select
End Sub
Sub HScroll1_Scroll (index As Integer)
Dim multiturn As Integer
Select Case index
Case 0
multiturn = hscroll1(index) / 100
knob1.KnobMultiTurnValue = multiturn
label2(index) = multiturn
Case 1
knob1.KnobSnapIncrement = hscroll1(index) / 10
label2(index) = knob1.KnobSnapIncrement
End Select
End Sub